//
//  MyCollectionReusableView.m
//  HeartTravel
//
//  Created by dlios on 15-6-30.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "MyCollectionReusableView.h"

@implementation MyCollectionReusableView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.myLabel = [[UILabel alloc] init];
        [self addSubview:self.myLabel];
        [self.myLabel release];
        
        self.myImageView = [[UIImageView alloc] init];
        [self addSubview:self.myImageView];
        [self.myImageView release];
        
        
    }
    return self;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    
    self.myLabel.frame = CGRectMake(50, 20, 200, 30);
    self.myImageView.frame = CGRectMake(20, 20, 30, 30);
    [self.myImageView setImage:[UIImage imageNamed:@"iconfont-favorfill"]];
}

- (void)setIsMore:(BOOL)isMore{
    _isMore = isMore;
    [self addButton];
}
- (void)addButton{
    if (self.isMore == YES) {
        self.moreButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [self addSubview:self.moreButton];
        self.moreButton.frame = CGRectMake(self.frame.size.width - 30, 25, 20, 20);
        [self.moreButton setImage:[UIImage imageNamed:@"iconfont-gengduo"] forState:UIControlStateNormal];
    }else{
        [self.moreButton removeFromSuperview];
    }
}



@end
